package gof_003_行为型_Behavioral.gof_005_责任链_ChainOfResponsibility.gof_002_Chain;

import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        //获取天数
        double days = getDays();
        //构建请假的职工
        AskForLeave employee = new AskForLeave(days, "小张");

        //进入流程
        Chain chain = new Chain();
        chain.start(employee);
    }

    private static double getDays() {
        System.out.println("请输入请假天数:");
        Scanner scanner = new Scanner(System.in);
        double v = scanner.nextDouble();
        return v;
    }
}
